#pragma warning disable 108
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using Cephei;
using Cephei.Core;
using Cephei.Core.Generic;
using Microsoft.FSharp.Core;
using Cephei.QL.Times;
using Cephei.QL.Indexes;
using Cephei.QL.Termstructures;
namespace Cephei.QL.Cashflows
{
    /// <summary> 
	/// ! The payoff \f$ P \f$ of a capped floating-rate coupon is: \f[ P = N \times T \times \min(a L + b, C). \f] The payoff of a floored floating-rate coupon is: \f[ P = N \times T \times \max(a L + b, F). \f] The payoff of a collared floating-rate coupon is: \f[ P = N \times T \times \min(\max(a L + b, F), C). \f]  where \f$ N \f$ is the notional, \f$ T \f$ is the accrual time, \f$ L \f$ is the floating rate, \f$ a \f$ is its gearing, \f$ b \f$ is the spread, and \f$ C \f$ and \f$ F \f$ the strikes.  They can be decomposed in the following manner. Decomposition of a capped floating rate coupon: \f[ R = \min(a L + b, C) = (a L + b) + \min(C - b - \xi |a| L, 0) \f] where \f$ \xi = sgn(a) \f$. Then: \f[ R = (a L + b) + |a| \min(\frac{C - b}{|a|} - \xi L, 0) \f]
	/// </summary>
    [Guid ("AAACD805-D7EB-4467-8EC6-1A81F19A0543"),ComVisible(true)]
	public interface ICappedFlooredCoupon : Cephei.QL.Cashflows.IFloatingRateCoupon
	{
		///////////////////////////////////////////////////////////////
        // Methods
        //
        /// <summary> 
		/// 
		/// </summary>
		 Double Cap {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double ConvexityAdjustment {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double EffectiveCap {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double EffectiveFloor {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double Floor {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Boolean IsCapped {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Boolean IsFloored {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double Rate {get;}
        /// <summary> 
		/// 
		/// </summary>
		 ICappedFlooredCoupon SetPricer(Cephei.QL.Cashflows.IFloatingRateCouponPricer pricer);
        /// <summary> 
		/// 
		/// </summary>
		 ICappedFlooredCoupon Update {get;}
    }   

    /// <summary> 
	/// ! The payoff \f$ P \f$ of a capped floating-rate coupon is: \f[ P = N \times T \times \min(a L + b, C). \f] The payoff of a floored floating-rate coupon is: \f[ P = N \times T \times \max(a L + b, F). \f] The payoff of a collared floating-rate coupon is: \f[ P = N \times T \times \min(\max(a L + b, F), C). \f]  where \f$ N \f$ is the notional, \f$ T \f$ is the accrual time, \f$ L \f$ is the floating rate, \f$ a \f$ is its gearing, \f$ b \f$ is the spread, and \f$ C \f$ and \f$ F \f$ the strikes.  They can be decomposed in the following manner. Decomposition of a capped floating rate coupon: \f[ R = \min(a L + b, C) = (a L + b) + \min(C - b - \xi |a| L, 0) \f] where \f$ \xi = sgn(a) \f$. Then: \f[ R = (a L + b) + |a| \min(\frac{C - b}{|a|} - \xi L, 0) \f] Factory
	/// </summary>
   	[ComVisible(true)]
    public interface ICappedFlooredCoupon_Factory 
    {
        ///////////////////////////////////////////////////////////////
        // Factory methods
        //
        /// <summary> 
		/// 
		/// </summary>
	    ICappedFlooredCoupon Create (Cephei.QL.Cashflows.IFloatingRateCoupon underlying, Microsoft.FSharp.Core.FSharpOption<Double> cap, Microsoft.FSharp.Core.FSharpOption<Double> floor, Cephei.QL.Cashflows.IFloatingRateCouponPricer QL_Pricer);
    }
}

